/**
 * Shopware 4.0
 * Copyright © 2012 shopware AG
 *
 * According to our dual licensing model, this program can be used either
 * under the terms of the GNU Affero General Public License, version 3,
 * or under a proprietary license.
 *
 * The texts of the GNU Affero General Public License with an additional
 * permission and of our proprietary license can be found at and
 * in the LICENSE file you have received along with this program.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * "Shopware" is a registered trademark of shopware AG.
 * The licensing of the program under the AGPLv3 does not imply a
 * trademark license. Therefore any rights, title and interest in
 * our trademarks remain entirely with us.
 *
 * @category   Shopware
 * @package    Shopware_Styling
 * @subpackage Toolbar
 * @copyright  Copyright (c) 2012, shopware AG (http://www.shopware.de)
 * @version    $Id$
 * @author shopware AG
 */

// Default window toolbar
// Default window toolbar
.#{$prefix}window, .#{$prefix}window-default {
	.#{$prefix}toolbar, .#{$prefix}toolbar-default {
	    border-left: 1px solid $light-border-color;
       	border-right: 1px solid $light-border-color;

	 	// Default search field
		.searchfield {
			@include border-radius(0);

			// Left radius with search icon
	  		&:before {
	  		    position: absolute;
	  			left: -22px;
	  		   	display: block;
	  			width: 22px;
	 			content: '';
	 			background: theme-image($theme, 'window_search_left.png') no-repeat;
	 			height: 21px;
	  		}

			// Main field background
			.#{$prefix}form-item-body {
				@include reset-border-radius;
				background: theme-image($theme, 'window_search_mid.png') repeat-x;
				padding: 0;
			}

			// Right radius
	 		.#{$prefix}form-text {
				background: theme-image($theme, 'window_search_right.png') no-repeat right 0;
				border: 0 none;
				height: 21px;
				color: $light-font-color;
				font-size: 11px;
				@include reset-border-radius;
				@include reset-box-shadow;
	 		}
	    }
	}
}
.#{$prefix}ie9 .#{$prefix}window, .#{$prefix}ie9 .#{$prefix}window-default {
    .#{$prefix}toolbar, .#{$prefix}toolbar-default {
        .searchfield {
            .#{$prefix}form-item-body {
                margin: 0 0 0 22px;
                position: relative;

                &:before {
                    position: absolute;
                    left: -22px;
                    display: block;
                    width: 22px;
                    content: '';
                    background: theme-image($theme, 'window_search_left.png') no-repeat;
                    height: 21px;
                }
            }
        }
    }
}

// Paging Toolbar
.#{$prefix}toolbar-docked-bottom {
	@include border-radius(0 0 3px 3px);
    background: $toolbar-background-color;

	// Button normal style
    .#{$prefix}btn-default-toolbar-small{
        background: transparent;

        em, button {
            background: transparent;
            line-height: $toolbar-text-line-height;
            height: $toolbar-text-line-height;
        }
    }

    // Select page number field
    .#{$prefix}tbar-page-number .#{$prefix}form-item-body {

        // Normal state
        .#{$prefix}form-text {
        	@include border-radius(3px);
			border-color: #b1bac0 #cad0d4 #dbdfe2;
			-webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
			-moz-transition: border linear 0.2s, box-shadow linear 0.2s;
			-ms-transition: border linear 0.2s, box-shadow linear 0.2s;
			-o-transition: border linear 0.2s, box-shadow linear 0.2s;
			transition: border linear 0.2s, box-shadow linear 0.2s;
        }

        // Active state
     	.#{$prefix}form-focus {
			border-color: rgba(82, 168, 236, 0.8);
			-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
			-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
			box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
		}
    }

    // Paging toolbar icons
    .#{$prefix}btn-default-toolbar-small .#{$prefix}btn-center {

        .#{$prefix}tbar-page-first, .#{$prefix}tbar-page-prev, .#{$prefix}tbar-page-next, .#{$prefix}tbar-page-last {
            background-image: theme-image($theme, 'sprite-arrows.png') !important;
            background-repeat: no-repeat;
        }

        .#{$prefix}tbar-page-first { background-position: 0 -198px }
        .#{$prefix}tbar-page-prev { background-position: 0 -66px }
        .#{$prefix}tbar-page-next { background-position: 0 -462px }
        .#{$prefix}tbar-page-last { background-position: 0 -330px }

        .#{$prefix}tbar-loading {
            background: url("") no-repeat !important;
        }
    }

    // Disabled toolbar icons
    .#{$prefix}btn-default-toolbar-small-disabled .#{$prefix}btn-center {
        .#{$prefix}tbar-page-first { background-position: 0 -132px }
        .#{$prefix}tbar-page-prev { background-position: 0 0 }
        .#{$prefix}tbar-page-next { background-position: 0 -396px }
        .#{$prefix}tbar-page-last { background-position: 0 -264px}

        .#{$prefix}tbar-loading {
            background: url("") no-repeat !important
        }
    }
}

// Main Menu Toolbar
.shopware-menu {
	@include single-box-shadow(#475C6A, -1px, 0, 4px);
	padding: 0 0 0 6px;
    background: theme-image($theme, 'nav_taskbar_top_bg.png') repeat-x;
    border-bottom: 1px solid #0057A7 !important;
    border-top: 0 none !important;
    overflow: visible;
    position: fixed;
    left: 0; top: 0;
    width: 100%;

    .#{$prefix}box-inner {
		width: 100% !important;
		background: theme-image($theme, 'sw4_logo-shine.png') no-repeat right 0;
	}

	// Seperators
	.#{$prefix}toolbar-separator-horizontal {
	   height: 40px;
	   border-left: 1px solid rgba(0, 83, 153, 0.5);
	   border-right: 1px solid rgba(97, 209, 255, 0.45);
   }

   // Search field
   .searchfield-container {
       margin: 0 0 0 12px;
       @include transition-property(all);
       @include transition-duration(0.3s);
       @include transition-timing-function(ease-out);
       @include border-radius(16px);
       position: relative;
       top: 6px !important;
       
       table {
           margin: 0 !important;
       }
   }
   .searchfield tbody {
       background: theme-image($theme, 'search_taskbar_top_left.png') no-repeat 0 0;
       padding: 0 0 0 26px;
       height: $search-field-height;
       width: auto !important;
       display: block;
       margin: 0 !important;

       .#{$prefix}form-item-body {
           background: theme-image($theme, 'search_taskbar_top_right.png') no-repeat right 0;
           padding: 0 14px 0 0;
           height: $search-field-height;
           width: auto !important;

           .#{$prefix}form-field {
               @include border-radius(0px);
           	   @include reset-box-shadow;
               background: theme-image($theme, 'search_taskbar_top_mid.png') repeat-x 0 0;
               border: 0 none;
               height: $search-field-height;
               width: auto !important;
               color: #3075ac;
               font-size: 11px;
           }
       }
	}

    // Search field - Focus state
    .searchcontainer-focus {
        -webkit-box-shadow: 0 0 5px #fff;
        -moz-box-shadow: 0 0 5px #fff;
        -ms-box-shadow: 0 0 5px #fff;
        -o-box-shadow: 0 0 5px #fff;
        box-shadow: 0 0 5px #fff;
    }
}

// Search drop down
.#{$prefix}search-dropdown {
	top: 54px !important;
	width: 255px;
	border-bottom: 1px solid #a3adb4;
	-webkit-box-shadow: 0 0 18px rgba(0, 55, 110, 0.7) !important;
	-moz-box-shadow: 0 0 18px rgba(0, 55, 110, 0.7) !important;
	-ms-box-shadow: 0 0 18px rgba(0, 55, 110, 0.7) !important;
	box-shadow: 0 0 18px rgba(0, 55, 110, 0.7) !important;
	
	.arrow-top {
		background: url("") no-repeat;
		display: block;
		position: absolute;
		top: -5px; left: 16px;
		width: 10px; height: 7px;
	}
	
	.header {
		@include inner-border(1px 1px 0 1px, #79cbf4);
		background: theme-image($theme, 'bg_search-header.png') repeat-x 0 0;
		border: 1px solid #1974d8;
		height: 33px;
		color: #fff;
		font-weight: bold;
		line-height: 33px;
		text-shadow: 1px 1px 0 #1774d8;
		
		.inner {
			padding: 0 0 0 40px;
		}
	}
	
	.articles .header {
		@include border-radius(3px 3px 0 0);
		.inner {
			background: url("") no-repeat 14px 7px;
		}
	}
	
	.customers .header .inner {
		background: theme-image($theme, 'icon_taskbar_top_kunden.png') no-repeat 14px 7px;
	}
	
	.orders .header .inner {
		background: theme-image($theme, 'icon_taskbar_top_artikel.png') no-repeat 14px 7px;
	}
	
	.result-container {
		border-left: 1px solid #a3adb4;
		border-right: 1px solid #a3adb4;
		background: #fff url("") repeat-x left top;
		
		// Empty search result
		.empty {
			padding: 8px 18px;
			color: $font-color;	
		}
		
		a {
			display: block;
			border: 1px solid transparent;
			border-bottom: 1px solid #ccc;
			color: #475c6b;
			text-shadow: 1px 1px 0 #fff;
			text-decoration: none;
			font-weight: bold;
			padding: 8px 18px;
			position: relative;
			
			@include transition-property(all);
       		@include transition-duration(0.5s);
       		@include transition-timing-function(ease-out);
			
			// Hover style
			&:hover {
				border-top-color: #c3dcf0;
				border-bottom-color: #c3dcf0;
				background: #e2f3ff;
			}
			
			// Description
			.desc, .right {
				display: block;
				font-size: 11px;
				font-weight: normal;
			}
			
			// Amount
			.right {
				position: absolute;
				right: 18px;
				top: 8px;
			}
		}
		
		a:last-child {
			border-bottom: 0 none;
		}
	}
}

// IE 9 Top Menu
.#{$prefix}ie9 .shopware-menu {
    background: theme-image($theme, 'nav_taskbar_top_bg.png') repeat-x !important;

    .searchfield {
        .#{$prefix}form-item-body {
            position: relative;
        }

        .#{$prefix}form-field {
            margin: 0 0 0 26px;

            &:before {
                display: block;
                background: theme-image($theme, 'search_taskbar_top_left.png') no-repeat 0 0;
                position: absolute;
                top: 0;
                left: -26px;
                content: '';
            }
        }
    }
}

// Footer Toolbar
.shopware-footer {
    position: fixed;
   	padding: 0 6px 0 6px;
	background: theme-image($theme, 'nav_taskbar_cap_bg.png') repeat-x 0 0;
	border-top: 1px solid $font-color !important;
	box-shadow: -1px 1px 5px $font-color;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 11;

	// Seperator
	.#{$prefix}toolbar-separator-horizontal {
		top: 0px !important;
        height: 40px;
        border-left: 1px solid #a1adb6;
        border-right: 1px solid #dfe4e8;
    }
}
// IE 9 Footer
.#{$prefix}nlg .shopware-footer {
    background: theme-image($theme, 'nav_taskbar_cap_bg.png') repeat-x !important;
}

.#{$prefix}toolbar-shopware-ui {
    border: 0 none;
    background: $toolbar-background-color;
}
.window-management-holder {
    width: 100% !important;
    height: 40px !important;
}
.logout-tooltip  {
    @include border-radius(3px);
    position: fixed !important;
    bottom: 50px !important;
    left: 10px !important;
    top: auto !important;
    background: rgba(0, 0, 0, .5);
    border: 0 none;

    .#{$prefix}tip-body {
        color: #fff;
        padding: 4px 12px;
        position: relative;
        overflow: visible;

        span {
            float: left;
            border-right: 1px solid rgba(0, 0, 0, 0.3);
            display: block;
            padding-right: 5px;
        }

        a {
            color: #fff;
            float: left;
            display: block;
            padding-left: 5px;
            border-left: 1px solid rgba(100, 100, 100, 0.8);
            font-weight: bold;
            text-decoration: none;

            &:hover {
                text-decoration: underline;
            }
        }

        .arrow {
            background: url("") no-repeat;
            width: 10px;
            height: 5px;
            position: absolute;
            bottom: -7px;
            left: 10px;
        }
    }
}

.#{$prefix}window > .#{$prefix}toolbar-shopware-ui-docked-bottom, .shopware-toolbar {
	padding: 5px 8px 6px 8px;
	
	.#{$prefix}box-inner {
		overflow: visible;
	}
}